asp分页问提<为什么不能分页>
来源:百度知道 编辑:UC知道 时间:2024/06/28 15:34:46
我的代码是:
<!--#include file="conn.asp"-->
<style type="text/css">
<!--
.STYLE1 {
font-size: 16px;
font-weight: bold;
color: #990000;
}
.STYLE2 {font-size: 18px}
-->
</style>
<title>新闻发布系统——首页——</title><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<p class="STYLE1 STYLE2">新闻列表</p>
<p> <a href="admin.asp">管理员登陆</a> <a href="body.asp">查看最新新闻</a> <a href="index.htm">添加新闻</a></p>
</div></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="
<!--#include file="conn.asp"-->
<style type="text/css">
<!--
.STYLE1 {
font-size: 16px;
font-weight: bold;
color: #990000;
}
.STYLE2 {font-size: 18px}
-->
</style>
<title>新闻发布系统——首页——</title><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<p class="STYLE1 STYLE2">新闻列表</p>
<p> <a href="admin.asp">管理员登陆</a> <a href="body.asp">查看最新新闻</a> <a href="index.htm">添加新闻</a></p>
</div></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="
哎,无语,没看见有人回答了,我也发现这个,改成
sql="select * from news order by id desc"
哎,很是新手呀,这都问,
那就说上两句吧
分页这一页这样写
<a href="详细页?id=<%=rs("id")%>">标题</a>
详细页
id=request("id")
sql="select * from 表"&id
查询输入,完事
sql="select top 10 * from news order by id desc"
你只是取出了10条记录
我顶啊,你一共提取了10条记录,你又设置了page_size=10,不就是只有一页码??你修改为小于10的就可以看到了。
代码是没有错的,是你对代码不能理解而已。
sql="select * from news order by id desc"
<a href="详细页?id=<%=rs("id")%>">标题</a>